/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.kaetec.views;

import br.com.kaetec.listeners.ClienteActionListener;
import javax.swing.JLabel;
import javax.swing.JTable;

/**
 *
 * @author Sergio Artero
 */
public class ClientesForm extends javax.swing.JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2744949212781389043L;
	private ClienteActionListener listener;

	/**
	 * Creates new form KaetecPrincial
	 */
	public ClientesForm( BrowseClientesForm formBrwClientes) {
		initComponents();
		setListener(new ClienteActionListener(formBrwClientes, this));
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jpBannerCadastro = new javax.swing.JPanel();
        lbCadastroCliente = new javax.swing.JLabel();
        jpButtons = new javax.swing.JPanel();
        jsSeparadorDeBotoes1 = new javax.swing.JSeparator();
        btSalvar = new javax.swing.JButton();
        btCancelar = new javax.swing.JButton();
        jpCadastro = new javax.swing.JPanel();
        lbNome = new javax.swing.JLabel();
        txtNome = new javax.swing.JTextField();
        lbRg = new javax.swing.JLabel();
        txtRg = new javax.swing.JTextField();
        lbCpf = new javax.swing.JLabel();
        txtCpf = new javax.swing.JTextField();
        lbSexo = new javax.swing.JLabel();
        cbxSexo = new javax.swing.JComboBox();
        jsSeparador1 = new javax.swing.JSeparator();
        jtFolder = new javax.swing.JTabbedPane();
        jpFolderContatos = new javax.swing.JPanel();
        jpPanelInFolderContatos = new javax.swing.JPanel();
        jspContatos = new javax.swing.JScrollPane();
        jtbTableContatos = new javax.swing.JTable();
        jpFolderEndereco = new javax.swing.JPanel();
        jpPanelInFolderEndereco = new javax.swing.JPanel();
        jspEndereco = new javax.swing.JScrollPane();
        jtbTableEndereco = new javax.swing.JTable();
        lblID = new javax.swing.JLabel();
        lblIdConteudo = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jpBannerCadastro.setBackground(new java.awt.Color(255, 255, 255));
        jpBannerCadastro.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lbCadastroCliente.setFont(new java.awt.Font("Courier New", 1, 24)); // NOI18N
        lbCadastroCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/kaetec/views/images/icon_clientes.png"))); // NOI18N
        lbCadastroCliente.setText("Cadastro de Clientes");

        javax.swing.GroupLayout jpBannerCadastroLayout = new javax.swing.GroupLayout(jpBannerCadastro);
        jpBannerCadastro.setLayout(jpBannerCadastroLayout);
        jpBannerCadastroLayout.setHorizontalGroup(
            jpBannerCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpBannerCadastroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbCadastroCliente)
                .addContainerGap(98, Short.MAX_VALUE))
        );
        jpBannerCadastroLayout.setVerticalGroup(
            jpBannerCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpBannerCadastroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbCadastroCliente)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btSalvar.setText("Salvar");

        btCancelar.setText("Cancelar");

        javax.swing.GroupLayout jpButtonsLayout = new javax.swing.GroupLayout(jpButtons);
        jpButtons.setLayout(jpButtonsLayout);
        jpButtonsLayout.setHorizontalGroup(
            jpButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpButtonsLayout.createSequentialGroup()
                .addComponent(btSalvar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btCancelar)
                .addGap(73, 73, 73)
                .addComponent(jsSeparadorDeBotoes1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jpButtonsLayout.setVerticalGroup(
            jpButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jsSeparadorDeBotoes1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(btSalvar, javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(btCancelar))
        );

        jpCadastro.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lbNome.setText("Nome");

        lbRg.setText("RG");

        lbCpf.setText("CPF");

        lbSexo.setText("Sexo");

        cbxSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Masculino", "Feminino" }));

        jtbTableContatos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jspContatos.setViewportView(jtbTableContatos);

        javax.swing.GroupLayout jpPanelInFolderContatosLayout = new javax.swing.GroupLayout(jpPanelInFolderContatos);
        jpPanelInFolderContatos.setLayout(jpPanelInFolderContatosLayout);
        jpPanelInFolderContatosLayout.setHorizontalGroup(
            jpPanelInFolderContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jspContatos, javax.swing.GroupLayout.DEFAULT_SIZE, 414, Short.MAX_VALUE)
        );
        jpPanelInFolderContatosLayout.setVerticalGroup(
            jpPanelInFolderContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jspContatos, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jpFolderContatosLayout = new javax.swing.GroupLayout(jpFolderContatos);
        jpFolderContatos.setLayout(jpFolderContatosLayout);
        jpFolderContatosLayout.setHorizontalGroup(
            jpFolderContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpFolderContatosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpPanelInFolderContatos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jpFolderContatosLayout.setVerticalGroup(
            jpFolderContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpFolderContatosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpPanelInFolderContatos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jtFolder.addTab("Contatos", jpFolderContatos);

        jtbTableEndereco.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jspEndereco.setViewportView(jtbTableEndereco);

        javax.swing.GroupLayout jpPanelInFolderEnderecoLayout = new javax.swing.GroupLayout(jpPanelInFolderEndereco);
        jpPanelInFolderEndereco.setLayout(jpPanelInFolderEnderecoLayout);
        jpPanelInFolderEnderecoLayout.setHorizontalGroup(
            jpPanelInFolderEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jspEndereco, javax.swing.GroupLayout.DEFAULT_SIZE, 414, Short.MAX_VALUE)
        );
        jpPanelInFolderEnderecoLayout.setVerticalGroup(
            jpPanelInFolderEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jspEndereco, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jpFolderEnderecoLayout = new javax.swing.GroupLayout(jpFolderEndereco);
        jpFolderEndereco.setLayout(jpFolderEnderecoLayout);
        jpFolderEnderecoLayout.setHorizontalGroup(
            jpFolderEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpFolderEnderecoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpPanelInFolderEndereco, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jpFolderEnderecoLayout.setVerticalGroup(
            jpFolderEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpFolderEnderecoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpPanelInFolderEndereco, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jtFolder.addTab("Endereço", jpFolderEndereco);

        lblID.setText("ID:");

        javax.swing.GroupLayout jpCadastroLayout = new javax.swing.GroupLayout(jpCadastro);
        jpCadastro.setLayout(jpCadastroLayout);
        jpCadastroLayout.setHorizontalGroup(
            jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpCadastroLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jsSeparador1)
                    .addComponent(jtFolder, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpCadastroLayout.createSequentialGroup()
                        .addGroup(jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbRg)
                            .addComponent(lbNome))
                        .addGap(18, 18, 18)
                        .addGroup(jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jpCadastroLayout.createSequentialGroup()
                                .addComponent(txtRg, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(46, 46, 46)
                                .addComponent(lbCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(txtCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(txtNome)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpCadastroLayout.createSequentialGroup()
                        .addGroup(jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpCadastroLayout.createSequentialGroup()
                                .addComponent(lbSexo)
                                .addGap(21, 21, 21)
                                .addComponent(cbxSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpCadastroLayout.createSequentialGroup()
                                .addComponent(lblID)
                                .addGap(45, 45, 45)
                                .addComponent(lblIdConteudo, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jpCadastroLayout.setVerticalGroup(
            jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpCadastroLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblID, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblIdConteudo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbNome)
                    .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbRg)
                    .addComponent(txtRg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbCpf)
                    .addComponent(txtCpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbxSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbSexo))
                .addGap(8, 8, 8)
                .addComponent(jsSeparador1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtFolder)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jpBannerCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jpButtons, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jpCadastro, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpBannerCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jpButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jpCadastro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btCancelar;
    private javax.swing.JButton btSalvar;
    private javax.swing.JComboBox cbxSexo;
    private javax.swing.JPanel jpBannerCadastro;
    private javax.swing.JPanel jpButtons;
    private javax.swing.JPanel jpCadastro;
    private javax.swing.JPanel jpFolderContatos;
    private javax.swing.JPanel jpFolderEndereco;
    private javax.swing.JPanel jpPanelInFolderContatos;
    private javax.swing.JPanel jpPanelInFolderEndereco;
    private javax.swing.JSeparator jsSeparador1;
    private javax.swing.JSeparator jsSeparadorDeBotoes1;
    private javax.swing.JScrollPane jspContatos;
    private javax.swing.JScrollPane jspEndereco;
    private javax.swing.JTabbedPane jtFolder;
    private javax.swing.JTable jtbTableContatos;
    private javax.swing.JTable jtbTableEndereco;
    private javax.swing.JLabel lbCadastroCliente;
    private javax.swing.JLabel lbCpf;
    private javax.swing.JLabel lbNome;
    private javax.swing.JLabel lbRg;
    private javax.swing.JLabel lbSexo;
    private javax.swing.JLabel lblID;
    private javax.swing.JLabel lblIdConteudo;
    private javax.swing.JTextField txtCpf;
    private javax.swing.JTextField txtNome;
    private javax.swing.JTextField txtRg;
    // End of variables declaration//GEN-END:variables

    public javax.swing.JTextField getTxtNome(){
            return txtNome;
    }

    public javax.swing.JTextField getTxtRg(){
            return txtRg;
    }

    public javax.swing.JTextField getTxtCpf(){
            return txtCpf;
    }

    public javax.swing.JComboBox getCbxSexo(){
            return cbxSexo;
    }

    public javax.swing.JButton getBtSalvar(){
            return btSalvar;
    }

    public javax.swing.JButton getBtCancelar(){
            return btCancelar;
    }

    public ClienteActionListener getListener() {
            return listener;
    }

    public void setListener(ClienteActionListener listener) {
            this.listener = listener;
    }

    public JTable getJtbTableContatos() {
        return jtbTableContatos;
    }

    public void setJtbTableContatos(JTable jtbTableContatos) {
        this.jtbTableContatos = jtbTableContatos;
    }

    public JTable getJtbTableEndereco() {
        return jtbTableEndereco;
    }

    public void setJtbTableEndereco(JTable jtbTableEndereco) {
        this.jtbTableEndereco = jtbTableEndereco;
    }

    public JLabel getLblIdConteudo() {
        return lblIdConteudo;
    }

    public void setLblIdConteudo(JLabel lblIdConteudo) {
        this.lblIdConteudo = lblIdConteudo;
    }
    
}
